/**
 * Created by Administrator on 2017/11/6.
 */
const path = require("path");
const htmlWebpackPlugin = require("html-webpack-plugin");
const uglifyjsWebpackPlugin = require("uglifyjs-webpack-plugin");

module.exports = {
    entry:"./src/index.js",
    plugins:[
        new htmlWebpackPlugin({
            title:"热加载"
        }),
        new uglifyjsWebpackPlugin()
    ],
    module:{
        rules:[
            {
                test:/\.css$/,
                use:[
                    "style-loader",
                    "css-loader"
                ]
            }
        ]
    },
    output:{
        filename:"[name].bundle.js",
        path:path.resolve(__dirname,'dist')
    }
};